/**
 * User: yeqingzhou01
 * Date: 13-9-29
 * Time: 下午4:58
 */
var application = require('./controllers/application');
var dataControllers = require('./controllers/data-controller');

var routes = {
    //pages
    '/': ['get', application.index],
    //resources
    '/:businessType/:subject/:functionName': ['get', dataControllers.operationRouter]
}

exports.setAppRoutes = function(app){
    for(var onePath in routes){
        app[routes[onePath][0]](onePath, routes[onePath][1]);
        //i.e. app.get('/route/tag/:keyword', routes.routesWithTag);
    }
}